#include "digitkeyboard.h"
#include "ui_digitkeyboard.h"

DigitKeyBoard::DigitKeyBoard(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DigitKeyBoard)
{
    ui->setupUi(this);

    Init();
}

DigitKeyBoard::~DigitKeyBoard()
{
    delete ui;
}

void DigitKeyBoard::Init()
{
    // 无边框
    setWindowFlags(Qt::FramelessWindowHint);
    this->move(195, 205);
}

void DigitKeyBoard::on_ptb_0_clicked()
{
    emit SendKeyWord('0');
}

void DigitKeyBoard::on_ptb_1_clicked()
{
    emit SendKeyWord('1');
}

void DigitKeyBoard::on_ptb_2_clicked()
{
    emit SendKeyWord('2');
}

void DigitKeyBoard::on_ptb_3_clicked()
{
    emit SendKeyWord('3');
}

void DigitKeyBoard::on_ptb_4_clicked()
{
    emit SendKeyWord('4');
}

void DigitKeyBoard::on_ptb_5_clicked()
{
    emit SendKeyWord('5');
}

void DigitKeyBoard::on_ptb_6_clicked()
{
    emit SendKeyWord('6');
}

void DigitKeyBoard::on_ptb_7_clicked()
{
    emit SendKeyWord('7');
}

void DigitKeyBoard::on_ptb_8_clicked()
{
    emit SendKeyWord('8');
}

void DigitKeyBoard::on_ptb_9_clicked()
{
    emit SendKeyWord('9');
}

void DigitKeyBoard::on_ptb_del_clicked()
{
    emit SendKeyWord('d');
}

void DigitKeyBoard::on_ptb_clear_clicked()
{
    emit SendKeyWord('c');
}

void DigitKeyBoard::on_ptb_sure_clicked()
{
    this->close();
}
